/**
 * User: ShenBo
 * Created on: 2009-5-28, 21:21:41
 */

package shenbo.fetionlib.action;

import shenbo.fetionlib.FetionAccount;
import shenbo.fetionlib.response.LoginResponse;
import org.w3c.dom.Document;

public class AuthenticateAction implements FetionAction<LoginResponse>{
    private FetionAccount fetionAccount;

    public AuthenticateAction(FetionAccount fetionAccount) {
        this.fetionAccount = fetionAccount;
    }

    public String getRequestData() {
        return "/ssiportal/SSIAppSignIn.aspx?" + fetionAccount.getLoginUrl() + "&domains=fetion.com.cn;m161.com.cn";
    }


    public Protocol getProtocol() {
        return Protocol.HTTPS;
    }

    public Method getMethod() {
        return Method.GET;
    }

    public LoginResponse processResponse(Document xmlDocument) {
        System.out.println(xmlDocument.toString());
        return new LoginResponse();
    }

}
